<?php

class TopCrea extends CWidget
{
    public function init()
    {
		//TODO read out top 5 crea title
		
		$dataProvider=new CActiveDataProvider('CreaPoints');
        
		$this->widget('zii.widgets.grid.CGridView', array(
		'id'=>'events-grid',
		'dataProvider'=>$dataProvider,
		'summaryText' => '',
		'hideHeader' => 'true',
		'cssFile' => 'css/grid/styles.css',
		'columns'=>array(
			//'title',
			array(
			'name'  => 'title',
			'value' => 'CHtml::link($data->title, Yii::app()->createUrl("creatives/view",array("id"=>$data->id)))',
			'type'  => 'raw',
		),
		),
		)); 	
		
    }
 
    public function run()
    {
        // this method is called by CController::endWidget()
    }
}

?>
